package com.zhehekeji.opsys.api.entity;

// Generated 2015-8-20 16:23:56 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * TCmsMapping generated by hbm2java
 */
@Entity
@Table(name="t_cms_mapping")
public class TCmsMapping implements java.io.Serializable {

	/** 
	* @Fields serialVersionUID : TODO
	*/ 
	private static final long serialVersionUID = -2234269134912312615L;
	private Long id;
	private String code;
	private String categoryCode;
	private String seriesCode;
	private Integer sequence;
	private String orderNo;
	private Date onlineTime;
	private Date offlineTime;
	private Date createTime;
	private Integer status;
	private Long cpCode;
	private String seriesName;
	/**
	 * 随机数
	 */
	private Integer randomNumber;
	
	/**
	 * 生成编排关系时使用，当编排关系的节目集类型为普通VOD时，有值
	 * 为连续剧剧集时，为空
	 */
	private List<TCmsProgram> listTCmsProgram;
	
	public TCmsMapping() {
	}

	public TCmsMapping(String code, String categoryCode, String seriesCode,
			Integer sequence, String orderNo, Date onlineTime,
			Date offlineTime, Date createTime, Integer status, Long cpCode) {
		this.code = code;
		this.categoryCode = categoryCode;
		this.seriesCode = seriesCode;
		this.sequence = sequence;
		this.orderNo = orderNo;
		this.onlineTime = onlineTime;
		this.offlineTime = offlineTime;
		this.createTime = createTime;
		this.status = status;
		this.cpCode = cpCode;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID",length=20,nullable=false,unique=true)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	@Column(name="CODE",length=64,nullable=true)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	@Column(name="CATEGORY_CODE",length=64,nullable=true)
	public String getCategoryCode() {
		return this.categoryCode;
	}

	public void setCategoryCode(String categoryCode) {
		this.categoryCode = categoryCode;
	}
	@Column(name="SERIES_CODE",length=64,nullable=true)
	public String getSeriesCode() {
		return this.seriesCode;
	}

	public void setSeriesCode(String seriesCode) {
		this.seriesCode = seriesCode;
	}
	@Column(name="SEQUENCE",length=11,nullable=true)
	public Integer getSequence() {
		return this.sequence;
	}

	public void setSequence(Integer sequence) {
		this.sequence = sequence;
	}
	@Column(name="ORDER_NO",length=128,nullable=true)
	public String getOrderNo() {
		return this.orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="ONLINE_TIME", nullable=true)
	public Date getOnlineTime() {
		return this.onlineTime;
	}

	public void setOnlineTime(Date onlineTime) {
		this.onlineTime = onlineTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="OFFLINE_TIME", nullable=true)
	public Date getOfflineTime() {
		return this.offlineTime;
	}

	public void setOfflineTime(Date offlineTime) {
		this.offlineTime = offlineTime;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME", nullable=true)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name="STATUS",length=2,nullable=true)
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}
	@Column(name="CP_CODE",length=20,nullable=true)
	public Long getCpCode() {
		return this.cpCode;
	}

	public void setCpCode(Long cpCode) {
		this.cpCode = cpCode;
	}
	@Transient
	public String getSeriesName() {
		return seriesName;
	}

	public void setSeriesName(String seriesName) {
		this.seriesName = seriesName;
	}
	@Transient
	public List<TCmsProgram> getListTCmsProgram() {
		return listTCmsProgram;
	}

	public void setListTCmsProgram(List<TCmsProgram> listTCmsProgram) {
		this.listTCmsProgram = listTCmsProgram;
	}

	@Column(name = "RANDOM_NUMBER", length = 11, nullable = true)
	public Integer getRandomNumber() {
		return randomNumber;
	}

	public void setRandomNumber(Integer randomNumber) {
		this.randomNumber = randomNumber;
	}

}
